#ifndef __FONT_H__
#define __FONT_H__

#include "Common.h"
#include "Color.h"

namespace RayFrame
{
  class DLL_DECLARE FontBase
  {
  public:
    enum FontType
    {
      NoFont,
      SystemFont,
      TextureFont,
      GDIFont,
    };

    FontBase();
    virtual ~FontBase();

    void SetFontColor(Color c){ m_color = c; };
    Color GetFontColor(){ return m_color; };
    FontType GetFontType(){ return m_fontType; };

    ///Ordinary English fonts
    virtual bool BuildSystemFont(STRING fontName, int fontHeight) = 0;;

    //  ///Font from a bitmap
    //  virtual void BuildTextureFont(unsigned fonttex, int fontHeight, int screenWidth, int screenHeight) = 0;

#ifdef WIN32
    ///GDI fonts, for win32 only
    virtual void BuildGDIFont(LPCTSTR lpszFacename, int fontWeights, int fontHeight) = 0;
#endif

    virtual void PrintText(int x, int y, const char *string, ...);
    virtual void PrintText(int x, int y, STRING str);

  protected:  
    virtual void PrintSystemFontText(int x, int y, const char* str) = 0;
    //virtual void PrintTextureText(int x, int y, const char *string) = 0;
#ifdef WIN32
    virtual void PrintGDIText(int x, int y, STRING str) = 0;

    HFONT  m_hGDIFont;
#endif

    virtual void KillFont() = 0;

  protected:
    FontType m_fontType;

    unsigned  NormalFontBase;
    unsigned  TextureFontBase;
    unsigned  TextureFontFont;

    Color   m_color;
  }; 
}

#endif
